﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section1
{
    public class Example05
    {
        public Example05()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            V.Vector v = new V.Vector(3);
            v[0] = -1.0;
            v[1] = 1.0;
            v[2] = 2.0;

            V.Vector v3 = -2.0*v;

            result += v3[0].ToString() + "   " +
                v3[1].ToString() + "   " + v3[2].ToString() + "\r\n";

            V.Vector w = new V.Vector(3);
            w[0] = 3.0;
            w[1] = 5.0;
            w[2] = 7.0;

            V.Vector v2 = (v - (1.0/3.0)*w)%(3.0*v - w);

            result += v2[0].ToString() + "   " +
                v2[1].ToString() + "   " + v2[2].ToString() + "   ";   
        }
    }
}

/* 2   -2   -4
4.44089209850063E-16   -1.77635683940025E-15   8.88178419700125E-16 */  
